x86/mce: handle reserved domain ID in XEN_MC_msrinject
authorHaozhong Zhang <haozhong.zhang@intel.com>
Fri, 27 May 2016 13:30:33 +0000 (21:30 +0800)
committerWei Liu <wei.liu2@citrix.com>
Fri, 27 May 2016 15:10:34 +0000 (16:10 +0100)
commit55dc7f61260f4becc6c5e52a8155a6b8741c03cc
tree5bd59b81277ab805178417283c642702065f88e2
parent449f2dc9d8622a1787a5c9c62239fabcb6062d84
x86/mce: handle reserved domain ID in XEN_MC_msrinject

Commit 26646f3 "x86/mce: translate passed-in GPA to host machine
address" and commit 4ddf474 "tools/xen-mceinj: Pass in GPA when
injecting through MSR_MCI_ADDR" forgot to consider reserved domain
ID and mistakenly add MC_MSRINJ_F_GPADDR flag for them, which in turn
causes bug reported by
http://lists.xenproject.org/archives/html/xen-devel/2016-05/msg02640.html.

This patch removes MC_MSRINK_F_GPADDR flag and checks this when injecting
to reserved domain IDs except DOMID_SELF, and treats the passed-in
address as host machine address.

Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
tools/tests/mce-test/tools/xen-mceinj.c
xen/arch/x86/cpu/mcheck/mce.c